package cn.com.lms.business.exam.persistence.repository;

import cn.com.lms.business.exam.persistence.entity.QuestionCategory;
import com.bnzj.core.persistence.repository.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.Collection;

@Repository
public interface QuestionCategoryRepository extends BaseRepository<QuestionCategory,Long> {


    @Transactional
    @Modifying
    @Query(value = "update bnz_exam_question_category set is_delete =:isDelete WHERE id in (:collection)", nativeQuery = true)
    int updateIsDelete(@Param("isDelete") Boolean isDelete ,@Param("collection") Collection<Long> collection) ;



}
